package com.topcheer.common.datasource.exception;

import com.topcheer.common.datasource.constants.DataSourceConstants;
import lombok.Data;

/**
 * @ProjectName: cloud-master
 * @Package: com.akt.cloud.common.source.exception
 * @ClassName: NoDataSourceInfoException
 * @Description:
 * @Author: Lix
 * @CreateDate: 2020/3/30 22:19
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/3/30 22:19
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@Data
public class NoDataSourceKeyException extends RuntimeException {

    private int status = 200;

    private NoDataSourceKeyException(String message) {
        super(message);
        this.status = DataSourceConstants.EX_NO_DATA_SOURCE_KEY_BUILDER_CODE;
    }

    public static NoDataSourceKeyException newException(){
        return new NoDataSourceKeyException("No Data Source Key Builder Exception !!!");
    }

    public static NoDataSourceKeyException newException(String message){
        return new NoDataSourceKeyException(message);
    }

}
